﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for BasePage
/// </summary>
public class BasePage : System.Web.UI.Page
{
	public BasePage()
	{
        this.PreRender += Page_PreRender;
        this.PreInit += Page_MeuPreInit;
        
	}

    private void Page_PreRender(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(this.Title) || this.Title == "Untitled Page")
        {
            this.Title = "Sporte Store";            
        }
    }

    private void Page_MeuPreInit(object sender, EventArgs e)
    {
        HttpCookie temaEscolhido = Request.Cookies.Get("TemaEscolhido");
        if (temaEscolhido != null)
        {
            Page.Theme = temaEscolhido.Value;

        }
    }

   



    
}